import { ColumnProps } from "/@/components/ProTable/interface";
import { Dict } from '/@/utils/storage';
// 配置项
const columns = (): Partial<ColumnProps>[] => {
    return [{
            type: "selection",
            width: 60,
            fixed: "left"
        },
        {
            type: "index",
            label: "#",
            width: 60
        },{
            prop: "name",
            label: "姓名",
            search: true,
            width: 120,
        },
        {
            prop: "idcard",
            label: "证件号码",
            search: true,
        },
        {
            prop: "contact",
            label: "联系电话",
            search: true,
        },
        {
            prop: "education",
            label: "文化程度",
            search: true,
            enum:Dict.getList('education'),
            searchType: "select",
        },
        {
            prop: "birth",
            label: "出生日期",
            search: true,
            width: 120,
        },
        {
            prop: "dataStatus",
            label: "状态",
            tag: true,
            search: true,
            enum:[{label: '死亡', value: 0}, {label: '正常', value: 1}, {label: '失踪', value: 2}],
            searchType: "select",
            width: 140,
        },
        {
            prop: "operation",
            label: "操作",
            width: 160,
            fixed: "right"
        }
    ]
}

export default columns;